<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name" data-rule="required" class="form-control" name="row[name]" type="text">
        </div>
    </div>
<!--    <div class="form-group">-->
<!--        <label class="control-label col-xs-12 col-sm-2">{:__('Serial')}:</label>-->
<!--        <div class="col-xs-12 col-sm-8">-->
<!--            <input id="c-serial" data-rule="required" class="form-control" name="row[serial]" type="text">-->
<!--        </div>-->
<!--    </div>-->
<!--    <div class="form-group">-->
<!--        <label class="control-label col-xs-12 col-sm-2">{:__('Thumb')}:</label>-->
<!--        <div class="col-xs-12 col-sm-8">-->
<!--&lt;!&ndash;            <input id="c-thumb" data-rule="required" class="form-control" name="row[thumb]" type="text" value="">&ndash;&gt;-->
<!--            <div class="col-xs-12 col-sm-8">-->
<!--                <div class="input-group">-->
<!--                    <input id="c-thumb" class="form-control" size="90" name="row[thumb]" type="text" placeholder="{:__('最多选择三张图片')}">-->
<!--                    <div class="input-group-addon no-border no-padding">-->
<!--                        <span><button type="button" id="plupload-cover" class="btn btn-danger plupload" data-input-id="c-thumb" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="true" data-preview-id="p-cover"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>-->
<!--                        <span><button type="button" id="fachoose-cover" class="btn btn-primary fachoose" data-input-id="c-thumb" data-mimetype="image/*" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span>-->
<!--                    </div>-->
<!--                    <span class="msg-box n-right" for="c-cover"></span>-->
<!--                </div>-->
<!--                <ul class="row list-inline plupload-preview" id="p-cover"></ul>-->
<!--            </div>-->
<!--        </div>-->
<!--    </div>-->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Thumb')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-thumb" data-rule="required" class="form-control" size="50" name="row[thumb]" type="text" value="">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="plupload-introduce" class="btn btn-danger plupload" data-input-id="c-thumb" data-multiple="true" data-preview-id="p-thumb" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" ><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                     <span><button type="button" id="fachoose-thumb" class="btn btn-primary fachoose" data-input-id="c-thumb" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-thumb"></span>
            </div>
            <ul class="row list-inline plupload-preview" id="p-thumb"></ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Summary')}:</label>
        <div class="col-xs-12 col-sm-8">
<!--            <input id="c-summary" class="form-control" name="row[summary]" type="text">-->
            <textarea id="c-summary" class="form-control " rows="5" name="row[summary]" cols="50"></textarea>
        </div>
    </div>
<!--    <div class="form-group">-->
<!--        <label class="control-label col-xs-12 col-sm-2">{:__('Createtime')}:</label>-->
<!--        <div class="col-xs-12 col-sm-8">-->
<!--            <input id="c-createTime" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[createTime]" type="text" value="{:date('Y-m-d H:i:s')}">-->
<!--        </div>-->
<!--    </div>-->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Category')}:</label>
        <div class="col-xs-12 col-sm-8">
<!--            <input id="c-category" data-rule="required" class="form-control" name="row[category]" type="number" value="0">-->
            <select id="c-category" class="form-control selectpicker" name="row[category]">
                <option value="0">请选择</option>
                {foreach name="categoryList" item="vo"}
                     <option value="{$key}"  {in name="key" value="'0'"}selected{/in}>{$vo}</option>
                {/foreach}
            </select>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Tags')}:</label>
        <div class="col-xs-12 col-sm-8">
<!--            <input id="c-tags" data-rule="required" class="form-control" name="row[tags]" type="number" value="0">-->
            <input id="c-tags" data-rule="required" class="form-control selectpage" name="row[tags]" type="text" value="" data-source="vactivities/seriesactivity/tagslist" data-field="name" data-multiple="true" data-primary-key="id" data-order-by="id">
        </div>
    </div>


<!--    <div class="form-group">-->
<!--        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>-->
<!--        <div class="col-xs-12 col-sm-8">-->
<!--            <input id="c-status" class="form-control" name="row[status]" type="number" value="1">-->
<!--        </div>-->
<!--    </div>-->


    <div class="form-group row">
        <label class="control-label col-xs-12 col-sm-2">{:__('售卖信息')}:</label>
        <div class="col-xs-12 col-sm-8">
            <dl class="fieldlist" data-template="eventtpl" data-name="row[event]">
                <dd>
                    <ins>{:__('入场券名称')}</ins>
                    <ins>{:__('入场券价格')}(¥)</ins>
                    <ins>{:__('数量')}</ins>
                </dd>
                <dd><a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> {:__('Append')}</a></dd>备注:(价格0为免费券)
                <!--请注意 dd和textarea间不能存在其它任何元素，实际开发中textarea应该添加个hidden进行隐藏-->
                <textarea name="row[event]" class="form-control hidden" cols="30" rows="5">[{"name":"1","price":"0","number":"0"}]</textarea>
            </dl>
            <script id="eventtpl" type="text/html">
                <dd class="form-inline">
                    <ins><input type="text" name="row[ticket_name][]" class="form-control"  placeholder="入场券名称" size="20"/></ins>
                    <ins><input type="text" name="row[ticket_price][]" class="form-control"  placeholder="价格" size="10" /></ins>
                    <ins><input type="text" name="row[ticket_number][]" class="form-control" placeholder="数量" size="10"/></ins>
                    <!--下面的两个按钮务必保留-->
                    <span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span>
                    <span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span>
                </dd>
            </script>
        </div>
    </div>

    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
